package edu.gatech.ece6102;

/**
 * User: deepal
 * Date: Sep 28, 2010
 * Time: 6:40:12 PM
 */
public interface Logger {
    /**
     * To store a given message in the reliable storage. Message is represented
     * as a byte array and once stored it returns the message id
     *
     * @param message byte[] which represents the message
     */
    String store(byte[] message);

    /**
     * Retrieve a message for a given message id
     *
     * @param id message ID
     * @return if the message is present then return it, else NULL
     */
    byte[] retrieve(String id);

    /**
     * Remove the message from the store
     *
     * @param id message ID
     */
    void delete(String id);
}
